<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="other" tagdir="/WEB-INF/tags/other"%>
<%@ taglib prefix="sales" tagdir="/WEB-INF/tags/sales"%>
<%@ taglib prefix="system" tagdir="/WEB-INF/tags/system"%>
<title><fmt:message key="globalSearch.title"/></title>
<div class="main clearfix">
	<div class="main_left">
		<%---------------------------------start:左侧热销商品 -------------------------%>
		<system:cache key="solrSearch_hot_sell">
			<sales:recommendedProductList recommendedTypeName="hot_sell" sourceKind="1" maxResults="5" sourceIds="1" 
				returnProductListName="hotSellProductList" returnRecommendedTypeName="hotSellType">
				<%@ include file="../sales/recommendedProduct/display/indexHotSaleMouseOverEffect.jspf"%>
			</sales:recommendedProductList>			
		</system:cache>						
		<%---------------------------------end:  右侧热销商品 -------------------------%>
		<%---------------------------------start:浏览历史 -------------------------%>
		<%@ include file="../other/recentView.jsp"%>
		<%---------------------------------end:  浏览历史 -------------------------%>
	</div>
	<div class="main_right_content">
		<div class="wrap_10">
			<div class="content">
				<fmt:message key="globalSearch.searchResult">
					<fmt:param value="${solrSearchCriteria.keywords}"/>
					<fmt:param value="${sc.totalCount}"/>
					<fmt:param value="${solrSearchCriteria.qtime}"/>
				</fmt:message>
			</div>	
		</div>
		
		<div class="window_01">		
			<c:if test="${appConfig.isOpenFulltextSearch}">
				<div class="content">
					<div class="block1">
						<form name="solrSearchForm" id="solrSearchForm"  method="get" action="${ctxPath}/globalSearch.html" onsubmit="return validateFormWithMsg(this)">
							<input type="text" class="inputtxt2" id="gkeywords" name="keywords" style="width:290px"> 
							<input type="image" name="" src="${txtImagePath}/btn_search_02.gif" alt="搜索">
						</form>
					</div>
				</div>
			</c:if>	
			<ul class="info_list clearfix">
				<c:choose>
					<c:when test="${not empty entityList}">
						<form name="solrSearchForm" id="solrSearchForm"  method="get" action="${ctxPath}/globalSearch.html">
							<input type="hidden" name="keywords" id="keywords"  value="${solrSearchCriteria.keywords}" />
							<ul>
								<c:forEach items="${entityList}" var="indexEntity"	varStatus="itemStatus">
									<li class="clearfix">
										<p class="title">
											[${indexEntity.categoryName}] <a class="title"
												href="${ctxPath}${indexEntity.uri}" target="_blank">${indexEntity.entityTitle}</a>
										</p>
										<p class="link">
											<fmt:message key="globalSearch.updateTime"/>:&nbsp;<common:dateFormat date="${indexEntity.updateTime}" />
										</p>
										<p class="desc"><common:displayString value="${indexEntity.description}" length="190"/></p>
									</li>
								</c:forEach>
							</ul>
							<div class="page_bottom clearfix">
								<paging:linkPagingBottom/>
							</div>
						</form>
					</c:when>
					<c:otherwise>
						<other:noSearchResultMsg keyword="${keywords}" />
					</c:otherwise>
				</c:choose>
			</ul>
		</div>
	</div>
</div>


<c:set var="probizJs_validation" value="true" scope="request"/>
<script type="text/javascript">

$j(document).ready(function(){
	<c:if test="${appConfig.isOpenFulltextSearch}">
		applyValidate($('gkeywords'),"required");
	</c:if>
});
	
</script>


